package com.irdstudio.apicenter.console.service.template;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.irdstudio.apicenter.frame.maker.dm.SPageParamMain;
import com.irdstudio.apicenter.frame.maker.dm.SPageParamMainDao;

@Service(value = "sPageParamMainService")
public class SPageParamMainService {
	@Autowired
	private SPageParamMainDao sPageParamMainDao;

	/**
	 * 获取模块信息
	 * 
	 * @param id
	 * @param name
	 * @param pageNowe
	 * @param pageSiz
	 * @return
	 * @throws SQLException
	 * @throws ClassNotFoundException
	 */
	public List<SPageParamMain> queryByPageId(String page_id)
			throws SQLException {
		return sPageParamMainDao.queryByPageId(page_id);
	}

	public int update(String recordKey, String paramvalue) throws SQLException,
			ClassNotFoundException {
		return sPageParamMainDao.update(recordKey, paramvalue);
	}
	
	public int insert(SPageParamMain sPageParamMain) throws SQLException, ClassNotFoundException{
		return sPageParamMainDao.insert(sPageParamMain);
	}
	
	public String queryMaxKey() throws SQLException {
		return sPageParamMainDao.queryMaxKey();
	}

}
